package ModelLayer;
import java.util.ArrayList;
import java.util.Iterator;

/**
 * Write a description of class ItemCategoryContainer here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class ItemCategoryContainer
{
    // instance variables - replace the example below with your own
    private ArrayList<ItemCategory> itemList;
    //private ItemCategory itemCategory;
    
    public ItemCategoryContainer()
    {
        itemList = new ArrayList<ItemCategory>();
        createItemCategory();
    }
    
    public void createItemCategory()
    {
        ItemCategory itemCat = new ItemCategory(1, "Rent Junk");
        ItemCategory itemCat2 = new ItemCategory(1, "Sell Junk");
        itemList.add(itemCat);
        itemList.add(itemCat2);
    }
    
    /**
     * Rent Item Methods Part
     * 
     */
    
    public String getRentItemCategoryName()
    {
        return itemList.get(0).getName();
    }
    
    public RentItem getRentItem(long _id)
    {
        return itemList.get(0).getRentItem(_id);
    }
    
    public void createRentItem(RentItem _item)
    {
        itemList.get(0).createRentItem(_item);
    }
    
    public void updateRentItem(RentItem _item)
    {
        itemList.get(0).updateRentItem(_item);
    }
    
    public void removeRentItem(long _id)
    {
        itemList.get(0).removeRentItem(_id);
    }
    
    public ArrayList<RentItem> listAllRentItems()
    {
        return itemList.get(0).listAllRentItems();
    }
    
    /** 
     * Sell Item Methods Part
     * 
     */
    
    public String getSellItemCategoryName()
    {
        return itemList.get(1).getName();
    }
    
    public SellItem getSellItem(long _id)
    {
        return itemList.get(1).getSellItem(_id);
    }
    
    public void createSellItem(SellItem _item)
    {
        itemList.get(1).createSellItem(_item);
    }
    
    public void updateSellItem(SellItem _item)
    {
        itemList.get(1).updateSellItem(_item);
    }
    
    public void removeSellItem(long _id)
    {
        itemList.get(1).removeSellItem(_id);
    }
    
    public ArrayList<SellItem> listAllSellItems()
    {
        return itemList.get(1).listAllSellItems();
    }
}
